package cn.tedu.csmall.passport.security;


import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

@Getter
@Setter
@ToString(callSuper = true)//调用父类toString方法加上本类的toString内容
@EqualsAndHashCode
public class AdminDetails extends  User{
    private Long id;

    //继承父类，User没有无参的构造方法，设置了两个有参的构造方法，要设置构造方法，不然会报错
    public AdminDetails(
            String username,
            String password,
            boolean enabled,
            Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled, true, true, true, authorities);
    }
}
